package com.ntes.consumer2.service.impl;

import com.ntes.consumer2.service.Service0Client;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Service;

/**
 * Created by bjliuyue1 on 2017/5/23.
 */
@Service
public class Service0FallbackFactory implements FallbackFactory<Service0Client> {

    @Override
    public Service0Client create(final Throwable cause) {
        System.out.println("create:" + cause);
        return id -> {
            System.out.println("ff");
            return "default";
        };
    }
}
